package com.haixiaoke.saas.system.domain;

import com.haixiaoke.saas.common.utils.TreeUtil.ITree;

/**
 * 区域对象
 *
 * @author qixi
 * @date 2023/10/23
 */

public class SysArea extends ITree<String> {

    /**
     * 名称
     */
    private String name;


    /**
     * 级别1省、2市、3县区、4乡镇、5村
     */
    private Integer level;


    @Override
    protected boolean firstLevel() {
        return level == 1;
    }

    public SysArea(String id, String name, String parentId, Integer sort, Integer level) {
        super(id, parentId, sort, null);
        this.name = name;
        this.level = level;
    }

    public SysArea() {
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }
}
